<include file="Core:Public:header" />
{:W('Navigation')}
<script src="__PUBLIC__/js/datepicker/WdatePicker.js"></script>
<div class="body-right">
	<div class="row-table">
		<div class="row-table-title">调休详情</div>
		<div class="row-table-body">
			<form class="form-horizontal " action="{:U('hrm/lieu/add')}" method="post">
				<p class="form-title">
					调休详情&nbsp;&nbsp;
					<a href="{:U('hrm/lieu/edit', 'id='.$lieu['lieu_id'])}">编辑</a>&nbsp;&nbsp;
					<a href="javascript:history.go(-1);">返回</a>&nbsp;&nbsp;
					<a href="{:U('hrm/lieu/index')}">返回上级</a>&nbsp;&nbsp;
					<a href="javascript:void(0);" id="lieu_pass" class="pull-right btn btn-primary btn-xs" >已通过</a>
					<a href="javascript:void(0);" id="lieu_fail" class="pull-right btn btn-primary btn-xs" >未通过</a>
				</p>
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">调休人</label>
					<div class="col-sm-3">{$lieu.user_name}</div>
				</div>
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">调休类型</label>
					<div class="col-sm-3">{$lieu.category.name}</div>
					<label for="name" class="col-sm-2 control-label">状态</label>
					<div class="col-sm-3">
						<if condition="'0' eq $lieu['status']">
							<span style="color:#F8971C">{$lieu.status_name}</span>
						<elseif condition="'1' eq $lieu['status']" />
							<span style="color:#0EB930">{$lieu.status_name}</span>
						<else />
							<span style="color:#FF3908;">{$lieu.status_name}</span>
						</if>
					</div>
				</div>
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">开始时间</label>
					<div class="col-sm-3">{$lieu.start_time|date='Y-m-d H:i:s',###}</div>
					<label for="name" class="col-sm-2 control-label">结束时间</label>
					<div class="col-sm-3">{$lieu.end_time|date='Y-m-d H:i:s',###}</div>
				</div>
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">计算结果</label>
					<div class="col-sm-3">
						共<span>{$lieu.lieu_days}</span>天<span>{$lieu.lieu_hours}</span>小时
					</div>
				</div>
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">填写人</label>
					<div class="col-sm-3">
						{$lieu.maker_user_name}
					</div>
				</div>
					<label for="name" class="col-sm-2 control-label">请假原因</label>
				<div class="form-group">
					<div class="col-sm-8">
						<pre style="min-height:150px;">{$lieu.content}</pre>
					</div>
				</div>
			</form>	
		</div>
	</div>
</div>
<div class="clear"></div>
<script>
	/**
	 * 通过审核
	 **/
	$('#overtime_pass').click(function(){
		if(confirm('确定要审核通过吗？')){
			location.href="{:U('hrm/overtime/auditing','id='.$overtime['overtime_id'].'&status=1')}";
		}
	});
	
	/**
	 * 未通过审核
	 **/
	$('#overtime_fail').click(function(){
		if(confirm('确定要未通审核过吗？')){
			location.href="{:U('hrm/overtime/auditing','id='.$overtime['overtime_id'].'&status=2')}";
		}
	});
</script>
<include file="Core:Public:alert" />
<include file="Core:Public:footer" />